#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<math.h>

int judge(int n)
{
    for (int i = 2; i <= sqrt(n); i++)
    {
        if (n % i == 0)
        {
            return 0;
        }
    }
    return 1;
}

int countPrimeSetBits(int left, int right) {
    int ans = 0;
    while (left <= right)
    {
        int n = left;
        int count = 0;
        while (n)
        {
            if (n & 1 == 1)
            {
                count++;
            }
            n >>= 1;
        }
        if (count > 1)
        {
            if (judge(count))
            {
                ans++;
            }
        }
        left++;
    }
    return ans;
}

int main()
{
    printf("%d ",countPrimeSetBits(6, 10));
    return 0;
}